{% extends "base.html" %}

{% load humanize i18n page_metadata_tags %}

{% block metadata %}
    {% translate "Readiness" as trans_title %}
    {% page_metadata page_title=trans_title %}
{% endblock metadata %}

{% block body %}
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <h1>{% translate "Readiness" %}</h1>
            </div>
        </div>

        <div class="row">
            {% if django_releases.exists %}
                <div class="col-sm-6 col-md-4">
                    <h2>{% translate "Django Releases" %}</h2>
                    <ul>
                        {% for release in django_releases %}
                            <li class="text-2xl">
                                <a href="{% url 'readiness_detail' product_slug=release.product.slug cycle=release.cycle %}">
                                    {{ release }}
                                    {% if release.lts %} LTS {% endif %}
                                    {% if release.is_eol %}(Past EOL){% endif %}
                                </a>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            {% endif %}

            {% if python_releases.exists %}
                <div class="col-sm-6 col-md-4">
                    <h2>{% translate "Python Releases" %}</h2>
                    <ul>
                        {% for release in python_releases %}
                            <li class="text-2xl">
                                <a href="{% url 'readiness_detail' product_slug=release.product.slug cycle=release.cycle %}">
                                    {{ release }}
                                    {% if release.lts %} LTS {% endif %}
                                    {% if release.is_eol %}(Past EOL){% endif %}
                                </a>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            {% endif %}

            {% if wagtail_releases.exists %}
                <div class="col-sm-6 col-md-4">
                    <h2>{% translate "Wagtail Releases" %}</h2>
                    <ul>
                        {% for release in wagtail_releases %}
                            <li class="text-2xl">
                                <a href="{% url 'readiness_detail' product_slug=release.product.slug cycle=release.cycle %}">
                                    {{ release }}
                                    {% if release.lts %} LTS {% endif %}
                                    {% if release.is_eol %}(Past EOL){% endif %}
                                </a>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            {% endif %}
        </div>

        {% include "includes/_readiness-footer.html" %}
    </div>
{% endblock body %}
